package com.aspose.cells;

final class zqv {
   private static final zqv.za[] af = new zqv.za[10];
   private static final String[] ag;
   zcgb a;
   int b;
   byte[] c;
   int d;
   int e;
   int f;
   int g;
   byte h;
   byte i;
   int j;
   int k;
   int l;
   int m;
   byte[] n;
   int o;
   short[] p;
   short[] q;
   int r;
   int s;
   int t;
   int u;
   int v;
   int w;
   int x;
   int y;
   int z;
   int A;
   int B;
   int C;
   int D;
   int E;
   int F;
   int G;
   int H;
   int I;
   int J;
   short[] K = new short[1146];
   short[] L = new short[122];
   short[] M = new short[78];
   zbtr N = new zbtr();
   zbtr O = new zbtr();
   zbtr P = new zbtr();
   short[] Q = new short[16];
   int[] R = new int[573];
   int S;
   int T;
   byte[] U = new byte[573];
   int V;
   int W;
   int X;
   int Y;
   int Z;
   int aa;
   int ab;
   int ac;
   short ad;
   int ae;

   void a() {
      this.o = 2 * this.k;
      this.q[this.s - 1] = 0;

      for(int var1 = 0; var1 < this.s - 1; ++var1) {
         this.q[var1] = 0;
      }

      this.F = af[this.G].b;
      this.I = af[this.G].a;
      this.J = af[this.G].c;
      this.E = af[this.G].d;
      this.A = 0;
      this.w = 0;
      this.C = 0;
      this.x = this.D = 2;
      this.z = 0;
      this.r = 0;
   }

   void b() {
      this.N.i = this.K;
      this.N.k = zboq.c;
      this.O.i = this.L;
      this.O.k = zboq.d;
      this.P.i = this.M;
      this.P.k = zboq.e;
      this.ad = 0;
      this.ae = 0;
      this.ac = 8;
      this.c();
   }

   void c() {
      int var1;
      for(var1 = 0; var1 < 286; ++var1) {
         this.K[var1 * 2] = 0;
      }

      for(var1 = 0; var1 < 30; ++var1) {
         this.L[var1 * 2] = 0;
      }

      for(var1 = 0; var1 < 19; ++var1) {
         this.M[var1 * 2] = 0;
      }

      this.K[512] = 1;
      this.Z = this.aa = 0;
      this.X = this.ab = 0;
   }

   void a(short[] var1, int var2) {
      int var3 = this.R[var2];

      for(int var4 = var2 << 1; var4 <= this.S; var4 <<= 1) {
         if (var4 < this.S && a(var1, this.R[var4 + 1], this.R[var4], this.U)) {
            ++var4;
         }

         if (a(var1, var3, this.R[var4], this.U)) {
            break;
         }

         this.R[var2] = this.R[var4];
         var2 = var4;
      }

      this.R[var2] = var3;
   }

   static boolean a(short[] var0, int var1, int var2, byte[] var3) {
      short var4 = var0[var1 * 2];
      short var5 = var0[var2 * 2];
      return var4 < var5 || var4 == var5 && var3[var1] <= var3[var2];
   }

   void b(short[] var1, int var2) {
      short var4 = -1;
      short var6 = var1[1];
      int var7 = 0;
      short var8 = 7;
      byte var9 = 4;
      if (var6 == 0) {
         var8 = 138;
         var9 = 3;
      }

      var1[(var2 + 1) * 2 + 1] = -1;

      for(int var3 = 0; var3 <= var2; ++var3) {
         short var5 = var6;
         var6 = var1[(var3 + 1) * 2 + 1];
         ++var7;
         if (var7 >= var8 || var5 != var6) {
            if (var7 < var9) {
               this.M[var5 * 2] = (short)(this.M[var5 * 2] + var7);
            } else if (var5 != 0) {
               if (var5 != var4) {
                  ++this.M[var5 * 2];
               }

               ++this.M[32];
            } else if (var7 <= 10) {
               ++this.M[34];
            } else {
               ++this.M[36];
            }

            var7 = 0;
            var4 = var5;
            if (var6 == 0) {
               var8 = 138;
               var9 = 3;
            } else if (var5 == var6) {
               var8 = 6;
               var9 = 3;
            } else {
               var8 = 7;
               var9 = 4;
            }
         }
      }

   }

   int d() {
      this.b(this.K, this.N.j);
      this.b(this.L, this.O.j);
      this.P.b(this);

      int var1;
      for(var1 = 18; var1 >= 3 && this.M[zbtr.d[var1] * 2 + 1] == 0; --var1) {
         ;
      }

      this.Z += 3 * (var1 + 1) + 5 + 5 + 4;
      return var1;
   }

   void a(int var1, int var2, int var3) {
      this.a(var1 - 257, 5);
      this.a(var2 - 1, 5);
      this.a(var3 - 4, 4);

      for(int var4 = 0; var4 < var3; ++var4) {
         this.a(this.M[zbtr.d[var4] * 2 + 1], 3);
      }

      this.c(this.K, var1 - 1);
      this.c(this.L, var2 - 1);
   }

   void c(short[] var1, int var2) {
      short var4 = -1;
      short var6 = var1[1];
      int var7 = 0;
      short var8 = 7;
      byte var9 = 4;
      if (var6 == 0) {
         var8 = 138;
         var9 = 3;
      }

      for(int var3 = 0; var3 <= var2; ++var3) {
         short var5 = var6;
         var6 = var1[(var3 + 1) * 2 + 1];
         ++var7;
         if (var7 >= var8 || var5 != var6) {
            if (var7 < var9) {
               do {
                  this.a(var5, this.M);
                  --var7;
               } while(var7 != 0);
            } else if (var5 != 0) {
               if (var5 != var4) {
                  this.a(var5, this.M);
                  --var7;
               }

               this.a(16, this.M);
               this.a(var7 - 3, 2);
            } else if (var7 <= 10) {
               this.a(17, this.M);
               this.a(var7 - 3, 3);
            } else {
               this.a(18, this.M);
               this.a(var7 - 11, 7);
            }

            var7 = 0;
            var4 = var5;
            if (var6 == 0) {
               var8 = 138;
               var9 = 3;
            } else if (var5 == var6) {
               var8 = 6;
               var9 = 3;
            } else {
               var8 = 7;
               var9 = 4;
            }
         }
      }

   }

   final void a(byte[] var1, int var2, int var3) {
      System.arraycopy(var1, var2, this.c, this.f, var3);
      this.f += var3;
   }

   final void a(byte var1) {
      this.c[this.f++] = var1;
   }

   final void a(int var1) {
      this.a((byte)var1);
      this.a((byte)(var1 >>> 8));
   }

   final void b(int var1) {
      this.a((byte)(var1 >> 8));
      this.a((byte)var1);
   }

   final void a(int var1, short[] var2) {
      int var3 = var1 * 2;
      this.a(var2[var3] & '\uffff', var2[var3 + 1] & '\uffff');
   }

   void a(int var1, int var2) {
      if (this.ae > 16 - var2) {
         this.ad = (short)(this.ad | var1 << this.ae & '\uffff');
         this.a((int)this.ad);
         this.ad = (short)(var1 >>> 16 - this.ae);
         this.ae += var2 - 16;
      } else {
         this.ad = (short)(this.ad | var1 << this.ae & '\uffff');
         this.ae += var2;
      }

   }

   void e() {
      this.a(2, 3);
      this.a(256, zboq.a);
      this.g();
      if (1 + this.ac + 10 - this.ae < 9) {
         this.a(2, 3);
         this.a(256, zboq.a);
         this.g();
      }

      this.ac = 7;
   }

   boolean b(int var1, int var2) {
      this.c[this.Y + this.X * 2] = (byte)(var1 >>> 8);
      this.c[this.Y + this.X * 2 + 1] = (byte)var1;
      this.c[this.V + this.X] = (byte)var2;
      ++this.X;
      if (var1 == 0) {
         ++this.K[var2 * 2];
      } else {
         ++this.ab;
         --var1;
         ++this.K[(zbtr.f[var2] + 256 + 1) * 2];
         ++this.L[zbtr.a(var1) * 2];
      }

      if ((this.X & 8191) == 0 && this.G > 2) {
         int var3 = this.X * 8;
         int var4 = this.A - this.w;

         for(int var5 = 0; var5 < 30; ++var5) {
            var3 = (int)((long)var3 + (long)this.L[var5 * 2] * (5L + (long)zbtr.b[var5]));
         }

         var3 >>>= 3;
         if (this.ab < this.X / 2 && var3 < var4 / 2) {
            return true;
         }
      }

      return this.X == this.W - 1;
   }

   void a(short[] var1, short[] var2) {
      int var5 = 0;
      if (this.X != 0) {
         do {
            int var3 = this.c[this.Y + var5 * 2] << 8 & '\uff00' | this.c[this.Y + var5 * 2 + 1] & 255;
            int var4 = this.c[this.V + var5] & 255;
            ++var5;
            if (var3 == 0) {
               this.a(var4, var1);
            } else {
               byte var6 = zbtr.f[var4];
               this.a(var6 + 256 + 1, var1);
               int var7 = zbtr.a[var6];
               if (var7 != 0) {
                  var4 -= zbtr.g[var6];
                  this.a(var4, var7);
               }

               --var3;
               int var8 = zbtr.a(var3);
               this.a(var8, var2);
               var7 = zbtr.b[var8];
               if (var7 != 0) {
                  var3 -= zbtr.h[var8];
                  this.a(var3, var7);
               }
            }
         } while(var5 < this.X);
      }

      this.a(256, var1);
      this.ac = var1[513];
   }

   void f() {
      int var1 = 0;
      int var2 = 0;

      int var3;
      for(var3 = 0; var1 < 7; ++var1) {
         var3 += this.K[var1 * 2];
      }

      while(var1 < 128) {
         var2 += this.K[var1 * 2];
         ++var1;
      }

      while(var1 < 256) {
         var3 += this.K[var1 * 2];
         ++var1;
      }

      this.h = (byte)(var3 > var2 >>> 2 ? 0 : 1);
   }

   void g() {
      if (this.ae == 16) {
         this.a((int)this.ad);
         this.ad = 0;
         this.ae = 0;
      } else if (this.ae >= 8) {
         this.a((byte)this.ad);
         this.ad = (short)(this.ad >>> 8);
         this.ae -= 8;
      }

   }

   void h() {
      if (this.ae > 8) {
         this.a((int)this.ad);
      } else if (this.ae > 0) {
         this.a((byte)this.ad);
      }

      this.ad = 0;
      this.ae = 0;
   }

   void a(int var1, int var2, boolean var3) {
      boolean var4 = false;
      this.h();
      this.ac = 8;
      if (var3) {
         this.a((int)((short)var2));
         this.a((int)((short)(~var2)));
      }

      this.a(this.n, var1, var2);
   }

   void a(boolean var1) {
      this.c(this.w >= 0 ? this.w : -1, this.A - this.w, var1);
      this.w = this.A;
      this.a.c();
   }

   int c(int var1) {
      int var2 = 65535;
      if (var2 > this.d - 5) {
         var2 = this.d - 5;
      }

      while(true) {
         if (this.C <= 1) {
            this.i();
            if (this.C == 0 && var1 == 0) {
               return 0;
            }

            if (this.C == 0) {
               this.a(var1 == 4);
               if (this.a.g == 0) {
                  return var1 == 4 ? 2 : 0;
               }

               return var1 == 4 ? 3 : 1;
            }
         }

         this.A += this.C;
         this.C = 0;
         int var3 = this.w + var2;
         if (this.A == 0 || this.A >= var3) {
            this.C = this.A - var3;
            this.A = var3;
            this.a(false);
            if (this.a.g == 0) {
               return 0;
            }
         }

         if (this.A - this.w >= this.k - 262) {
            this.a(false);
            if (this.a.g == 0) {
               return 0;
            }
         }
      }
   }

   void b(int var1, int var2, boolean var3) {
      this.a(0 + (var3 ? 1 : 0), 3);
      this.a(var1, var2, true);
   }

   void c(int var1, int var2, boolean var3) {
      int var6 = 0;
      int var4;
      int var5;
      if (this.G > 0) {
         if (this.h == 2) {
            this.f();
         }

         this.N.b(this);
         this.O.b(this);
         var6 = this.d();
         var4 = this.Z + 3 + 7 >>> 3;
         var5 = this.aa + 3 + 7 >>> 3;
         if (var5 <= var4) {
            var4 = var5;
         }
      } else {
         var4 = var5 = var2 + 5;
      }

      if (var2 + 4 <= var4 && var1 != -1) {
         this.b(var1, var2, var3);
      } else if (var5 == var4) {
         this.a(2 + (var3 ? 1 : 0), 3);
         this.a(zboq.a, zboq.b);
      } else {
         this.a(4 + (var3 ? 1 : 0), 3);
         this.a(this.N.j + 1, this.O.j + 1, var6 + 1);
         this.a(this.K, this.L);
      }

      this.c();
      if (var3) {
         this.h();
      }

   }

   void i() {
      do {
         int var4 = this.o - this.C - this.A;
         int var1;
         if (var4 == 0 && this.A == 0 && this.C == 0) {
            var4 = this.k;
         } else if (var4 == -1) {
            --var4;
         } else if (this.A >= this.k + this.k - 262) {
            System.arraycopy(this.n, this.k, this.n, 0, this.k);
            this.B -= this.k;
            this.A -= this.k;
            this.w -= this.k;
            var1 = this.s;
            int var3 = var1;

            int var2;
            do {
               --var3;
               var2 = this.q[var3] & '\uffff';
               this.q[var3] = var2 >= this.k ? (short)(var2 - this.k) : 0;
               --var1;
            } while(var1 != 0);

            var1 = this.k;
            var3 = var1;

            do {
               --var3;
               var2 = this.p[var3] & '\uffff';
               this.p[var3] = var2 >= this.k ? (short)(var2 - this.k) : 0;
               --var1;
            } while(var1 != 0);

            var4 += this.k;
         }

         if (this.a.c == 0) {
            return;
         }

         var1 = this.a.a(this.n, this.A + this.C, var4);
         this.C += var1;
         if (this.C >= 3) {
            this.r = this.n[this.A] & 255;
            this.r = (this.r << this.v ^ this.n[this.A + 1] & 255) & this.u;
         }
      } while(this.C < 262 && this.a.c != 0);

   }

   int d(int var1) {
      int var2 = 0;

      while(true) {
         if (this.C < 262) {
            this.i();
            if (this.C < 262 && var1 == 0) {
               return 0;
            }

            if (this.C == 0) {
               this.a(var1 == 4);
               if (this.a.g == 0) {
                  if (var1 == 4) {
                     return 2;
                  }

                  return 0;
               }

               return var1 == 4 ? 3 : 1;
            }
         }

         if (this.C >= 3) {
            this.r = (this.r << this.v ^ this.n[this.A + 2] & 255) & this.u;
            var2 = this.q[this.r] & '\uffff';
            this.p[this.A & this.m] = this.q[this.r];
            this.q[this.r] = (short)this.A;
         }

         if ((long)var2 != 0L && (this.A - var2 & '\uffff') <= this.k - 262 && this.H != 2) {
            this.x = this.f(var2);
         }

         boolean var3;
         if (this.x < 3) {
            var3 = this.b(0, this.n[this.A] & 255);
            --this.C;
            ++this.A;
         } else {
            var3 = this.b(this.A - this.B, this.x - 3);
            this.C -= this.x;
            if (this.x <= this.F && this.C >= 3) {
               --this.x;

               do {
                  ++this.A;
                  this.r = (this.r << this.v ^ this.n[this.A + 2] & 255) & this.u;
                  var2 = this.q[this.r] & '\uffff';
                  this.p[this.A & this.m] = this.q[this.r];
                  this.q[this.r] = (short)this.A;
               } while(--this.x != 0);

               ++this.A;
            } else {
               this.A += this.x;
               this.x = 0;
               this.r = this.n[this.A] & 255;
               this.r = (this.r << this.v ^ this.n[this.A + 1] & 255) & this.u;
            }
         }

         if (var3) {
            this.a(false);
            if (this.a.g == 0) {
               return 0;
            }
         }
      }
   }

   int e(int var1) {
      int var2 = 0;

      while(true) {
         while(true) {
            if (this.C < 262) {
               this.i();
               if (this.C < 262 && var1 == 0) {
                  return 0;
               }

               if (this.C == 0) {
                  if (this.z != 0) {
                     this.b(0, this.n[this.A - 1] & 255);
                     this.z = 0;
                  }

                  this.a(var1 == 4);
                  if (this.a.g == 0) {
                     if (var1 == 4) {
                        return 2;
                     }

                     return 0;
                  }

                  return var1 == 4 ? 3 : 1;
               }
            }

            if (this.C >= 3) {
               this.r = (this.r << this.v ^ this.n[this.A + 2] & 255) & this.u;
               var2 = this.q[this.r] & '\uffff';
               this.p[this.A & this.m] = this.q[this.r];
               this.q[this.r] = (short)this.A;
            }

            this.D = this.x;
            this.y = this.B;
            this.x = 2;
            if (var2 != 0 && this.D < this.F && (this.A - var2 & '\uffff') <= this.k - 262) {
               if (this.H != 2) {
                  this.x = this.f(var2);
               }

               if (this.x <= 5 && (this.H == 1 || this.x == 3 && this.A - this.B > 4096)) {
                  this.x = 2;
               }
            }

            boolean var3;
            if (this.D >= 3 && this.x <= this.D) {
               int var4 = this.A + this.C - 3;
               var3 = this.b(this.A - 1 - this.y, this.D - 3);
               this.C -= this.D - 1;
               this.D -= 2;

               do {
                  if (++this.A <= var4) {
                     this.r = (this.r << this.v ^ this.n[this.A + 2] & 255) & this.u;
                     var2 = this.q[this.r] & '\uffff';
                     this.p[this.A & this.m] = this.q[this.r];
                     this.q[this.r] = (short)this.A;
                  }
               } while(--this.D != 0);

               this.z = 0;
               this.x = 2;
               ++this.A;
               if (var3) {
                  this.a(false);
                  if (this.a.g == 0) {
                     return 0;
                  }
               }
            } else if (this.z != 0) {
               var3 = this.b(0, this.n[this.A - 1] & 255);
               if (var3) {
                  this.a(false);
               }

               ++this.A;
               --this.C;
               if (this.a.g == 0) {
                  return 0;
               }
            } else {
               this.z = 1;
               ++this.A;
               --this.C;
            }
         }
      }
   }

   int f(int var1) {
      int var2 = this.E;
      int var3 = this.A;
      int var6 = this.D;
      int var7 = this.A > this.k - 262 ? this.A - (this.k - 262) : 0;
      int var8 = this.J;
      int var9 = this.m;
      int var10 = this.A + 258;
      byte var11 = this.n[var3 + var6 - 1];
      byte var12 = this.n[var3 + var6];
      if (this.D >= this.I) {
         var2 >>= 2;
      }

      if (var8 > this.C) {
         var8 = this.C;
      }

      do {
         if (this.n[var1 + var6] == var12 && this.n[var1 + var6 - 1] == var11 && this.n[var1] == this.n[var3]) {
            int var4 = var1 + 1;
            if (this.n[var4] == this.n[var3 + 1]) {
               var3 += 2;
               ++var4;

               byte var10000;
               do {
                  ++var3;
                  var10000 = this.n[var3];
                  ++var4;
                  if (var10000 != this.n[var4]) {
                     break;
                  }

                  ++var3;
                  var10000 = this.n[var3];
                  ++var4;
                  if (var10000 != this.n[var4]) {
                     break;
                  }

                  ++var3;
                  var10000 = this.n[var3];
                  ++var4;
                  if (var10000 != this.n[var4]) {
                     break;
                  }

                  ++var3;
                  var10000 = this.n[var3];
                  ++var4;
                  if (var10000 != this.n[var4]) {
                     break;
                  }

                  ++var3;
                  var10000 = this.n[var3];
                  ++var4;
                  if (var10000 != this.n[var4]) {
                     break;
                  }

                  ++var3;
                  var10000 = this.n[var3];
                  ++var4;
                  if (var10000 != this.n[var4]) {
                     break;
                  }

                  ++var3;
                  var10000 = this.n[var3];
                  ++var4;
                  if (var10000 != this.n[var4]) {
                     break;
                  }

                  ++var3;
                  var10000 = this.n[var3];
                  ++var4;
               } while(var10000 == this.n[var4] && var3 < var10);

               int var5 = 258 - (var10 - var3);
               var3 = var10 - 258;
               if (var5 > var6) {
                  this.B = var1;
                  var6 = var5;
                  if (var5 >= var8) {
                     break;
                  }

                  var11 = this.n[var3 + var5 - 1];
                  var12 = this.n[var3 + var5];
               }
            }
         }

         if ((var1 = this.p[var1 & var9] & '\uffff') <= var7) {
            break;
         }

         --var2;
      } while(var2 != 0);

      return var6 <= this.C ? var6 : this.C;
   }

   int a(zcgb var1, int var2, int var3) {
      return this.a(var1, var2, 8, var3, 8, 0);
   }

   int a(zcgb var1, int var2, int var3, int var4, int var5, int var6) {
      byte var7 = 0;
      var1.i = null;
      if (var2 == -1) {
         var2 = 6;
      }

      if (var4 < 0) {
         var7 = 1;
         var4 = -var4;
      }

      if (var5 >= 1 && var5 <= 9 && var3 == 8 && var4 >= 9 && var4 <= 15 && var2 >= 0 && var2 <= 9 && var6 >= 0 && var6 <= 2) {
         var1.j = this;
         this.g = var7;
         this.l = var4;
         this.k = 1 << this.l;
         this.m = this.k - 1;
         this.t = var5 + 7;
         this.s = 1 << this.t;
         this.u = this.s - 1;
         this.v = (this.t + 3 - 1) / 3;
         this.n = new byte[this.k * 2];
         this.p = new short[this.k];
         this.q = new short[this.s];
         this.W = 1 << var5 + 6;
         this.c = new byte[this.W * 4];
         this.d = this.W * 4;
         this.Y = this.W / 2;
         this.V = 3 * this.W;
         this.G = var2;
         this.H = var6;
         this.i = (byte)var3;
         return this.a(var1);
      } else {
         return -2;
      }
   }

   int a(zcgb var1) {
      var1.d = var1.h = 0L;
      var1.i = null;
      var1.l = 2;
      this.f = 0;
      this.e = 0;
      if (this.g < 0) {
         this.g = 0;
      }

      this.b = this.g != 0 ? 113 : 42;
      var1.m = var1.n.a(0L, (byte[])null, 0, 0);
      this.j = 0;
      this.b();
      this.a();
      return 0;
   }

   int j() {
      if (this.b != 42 && this.b != 113 && this.b != 666) {
         return -2;
      } else {
         this.c = null;
         this.q = null;
         this.p = null;
         this.n = null;
         return this.b == 113 ? -3 : 0;
      }
   }

   int a(zcgb var1, int var2) {
      if (var2 <= 4 && var2 >= 0) {
         if (var1.e != null && (var1.a != null || var1.c == 0) && (this.b != 666 || var2 == 4)) {
            if (var1.g == 0) {
               var1.i = ag[7];
               return -5;
            } else {
               this.a = var1;
               int var3 = this.j;
               this.j = var2;
               int var4;
               int var5;
               if (this.b == 42) {
                  var4 = 8 + (this.l - 8 << 4) << 8;
                  var5 = (this.G - 1 & 255) >> 1;
                  if (var5 > 3) {
                     var5 = 3;
                  }

                  var4 |= var5 << 6;
                  if (this.A != 0) {
                     var4 |= 32;
                  }

                  var4 += 31 - var4 % 31;
                  this.b = 113;
                  this.b(var4);
                  if (this.A != 0) {
                     this.b((int)(var1.m >>> 16));
                     this.b((int)(var1.m & 65535L));
                  }

                  var1.m = var1.n.a(0L, (byte[])null, 0, 0);
               }

               if (this.f != 0) {
                  var1.c();
                  if (var1.g == 0) {
                     this.j = -1;
                     return 0;
                  }
               } else if (var1.c == 0 && var2 <= var3 && var2 != 4) {
                  var1.i = ag[7];
                  return -5;
               }

               if (this.b == 666 && var1.c != 0) {
                  var1.i = ag[7];
                  return -5;
               } else {
                  if (var1.c != 0 || this.C != 0 || var2 != 0 && this.b != 666) {
                     var4 = -1;
                     switch(af[this.G].e) {
                     case 0:
                        var4 = this.c(var2);
                        break;
                     case 1:
                        var4 = this.d(var2);
                        break;
                     case 2:
                        var4 = this.e(var2);
                     }

                     if (var4 == 2 || var4 == 3) {
                        this.b = 666;
                     }

                     if (var4 == 0 || var4 == 2) {
                        if (var1.g == 0) {
                           this.j = -1;
                        }

                        return 0;
                     }

                     if (var4 == 1) {
                        if (var2 == 1) {
                           this.e();
                        } else {
                           this.b(0, 0, false);
                           if (var2 == 3) {
                              for(var5 = 0; var5 < this.s; ++var5) {
                                 this.q[var5] = 0;
                              }
                           }
                        }

                        var1.c();
                        if (var1.g == 0) {
                           this.j = -1;
                           return 0;
                        }
                     }
                  }

                  if (var2 != 4) {
                     return 0;
                  } else if (this.g != 0) {
                     return 1;
                  } else {
                     this.b((int)(var1.m >>> 16));
                     this.b((int)(var1.m & 65535L));
                     var1.c();
                     this.g = -1;
                     return this.f != 0 ? 0 : 1;
                  }
               }
            }
         } else {
            var1.i = ag[4];
            return -2;
         }
      } else {
         return -2;
      }
   }

   static {
      af[0] = new zqv.za(0, 0, 0, 0, 0);
      af[1] = new zqv.za(4, 4, 8, 4, 1);
      af[2] = new zqv.za(4, 5, 16, 8, 1);
      af[3] = new zqv.za(4, 6, 32, 32, 1);
      af[4] = new zqv.za(4, 4, 16, 16, 2);
      af[5] = new zqv.za(8, 16, 32, 32, 2);
      af[6] = new zqv.za(8, 16, 128, 128, 2);
      af[7] = new zqv.za(8, 32, 128, 256, 2);
      af[8] = new zqv.za(32, 128, 258, 1024, 2);
      af[9] = new zqv.za(32, 258, 258, 4096, 2);
      ag = new String[]{"need dictionary", "stream end", "", "file error", "stream error", "data error", "insufficient memory", "buffer error", "incompatible version", ""};
   }

   static class za {
      int a;
      int b;
      int c;
      int d;
      int e;

      za(int var1, int var2, int var3, int var4, int var5) {
         this.a = var1;
         this.b = var2;
         this.c = var3;
         this.d = var4;
         this.e = var5;
      }
   }
}
